home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
FROMUTS
/
UNIXLIB37B
/
src
/
c
/
memset
< prev
next >
Wrap
Text File
|
1991-10-06
|
907b
|
61 lines
#ifdef __STDC__
static char sccs_id[] = "@(#) memset.c 1.0 "__DATE__" HJR";
#else
static char sccs_id[] = "@(#) memset.c 1.0 26/9/90 HJR";
#endif
/* memset.c (c) Copyright 1990 H.Rogers */
#include <string.h>
#ifdef ARCH
extern void *__memset(void *,int,size_t);
#endif
#ifdef __STDC__
void *(memset)(register void *s,register int c,register size_t n)
#else
void *(memset)(s,c,n)
register void *s;
register int c;
register size_t n;
#endif
#ifdef ARCH
{ return(__memset(s,c,n)); }
#else
{
register unsigned char *_s = (unsigned char *)s;
while (n & 0x07)
{
n--;
*_s++ = c;
}
n >>= 3; while (n)
{
n--;
*_s++ = c;
*_s++ = c;
*_s++ = c;
*_s++ = c;
*_s++ = c;
*_s++ = c;
*_s++ = c;
*_s++ = c;
}
return(s);
}
#endif
#ifdef __STDC__
void *(bzero)(register void *s,register size_t n)
#else
void *(bzero)(s,n)
register void *s;
register size_t n;
#endif
{
return(bzero(s,n));
}